package VIRTUAL;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.swing.JOptionPane;

public class conexion {
private Connection conexion;
 public Connection getConexion() {
    return conexion;
}    public void setConexion(Connection conexion) {
    this.conexion = conexion;
}


public conexion conectar() {
    try {
        Class.forName("oracle.jdbc.OracleDriver");
        String BaseDeDatos = "jdbc:oracle:thin:@quiroz-PC:1521:XE";
         
        conexion = DriverManager.getConnection(BaseDeDatos, "system","2323");
          } catch (Exception e) {
              
    }       
    return this;  
}
    public static void main(String[] args) {
conexion con=new conexion();
con.conectar();
//con.btnProbarconexionActionPerformed(null);
    }

    
}
